package com.shan;

import com.shan.dao.BrandMapper;
import com.shan.pojo.SqlSessionUtil;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;

public class DeleteById {
    public static void main(String[] args) throws IOException {
        SqlSession sqlSession = SqlSessionUtil.getSqlSession();

        BrandMapper mapper = sqlSession.getMapper(BrandMapper.class);

        int i = mapper.deleteOne(5);
        System.out.println(i);

        sqlSession.commit();
        sqlSession.close();


    }

}
